This simple system extension causes the hot spot of the cursor to blink. A cursor's hot spot is the single pixel position that the computer will use as the coordinate of the cursor. Normally the hot spot is obvious (at least to you and me), like the tip of the arrow or the tip of the finger in HyperCard's hand cursor. Other times, however, it's not so obvious such as the hot spot in the vertical bar of the text insertion cursor.
I got the idea for this while observing several groups of elementary and high school students work with educational software written in HyperCard. Since most of them (including the instructors) were absolute Macintosh novices, they were unaware of the "hot spot" concept. I watched many of the users trying to center the "palm" of the HyperCard hand cursor over a small button which, at least 2 out of 5 times, left the hot spot above the button.
Being of the "If you have to document it, you've probably done something wrong" school, I decided to try to create an INIT to blink the cursor's hot spot. My intent was to animate the cursor's hot spot, thereby focusing the user's attention on the hot spot, rather than the cursor as a whole.
You may be surprised at where the hot spot of some cursor's are. I was rather stunned to find that different applications have their own idea about where the hot spot of the text insertion cursor should be. Paint program seem to favor the baseline, Word and TeachText have it near the the top, while HyperCard has it near the bottom. So much for standards.
• Disclaimer •
I am uploading this beta version for compatibility testing. I would like to know if it causes any problems or causes the cursor to do strange and unusual things. It has only been tested under System 7.0 and 6.0.5.
• It only works on B&W Cursors! •
I have only tackled the problem of B&W cursors set via the SetCursor trap, and the 1-bit standard arrow cursor that gets set when you call InitCursor. Hot Spot will disable itself if a call to SetCCursor is made, so color cursors (even if they result in a 1-bit cursor) will not blink. I wrote this for the benefit of HyperCard, so unless I get a lot of people who _BEG_ me to upgrade it to color, it will probably stay this way. The blink rate is currently fixed at about 1.4 blinks per second.
System heap space occupied: 2236 bytes
Traps intercepted:
InitCursor
SetCursor
SetCCursor (to disable Hot Spot during a color cursor)
GetNextEvent (to animate the cursor)
• Revision History •
19-Jan-92, Version 0.1b0
Original Code
20-Jan-92, Version 0.1b1
Changed initCursorHook():
First it calls the real InitCursor(). Second, if the cursor should be inverted, it then calls newSetCursor() to set the cursor again. I originally avoided this method because I feared that the cursor would flicker too much if InitCursor() was called repeatedly by an application. However, casual testing indicates that my aprehension was unwarrented. Besides, I feel better about calling the real InitCursor() rather than emulating it with calls to ShowCursor() and SetCursor().
28-Jan-92, Version 0.1b2
Failure to preserve A5 caused Hot Spot to bomb during shut down. One of the traps must muck around with it because neither this code nor the Toolbox glue touches it.